<?php
	session_start();

	//restrict page access
	if(!isset($_SESSION['user']))
	{
		header('Location:index.php');
		exit;
	}

	include("std_dbs.php");
	$title = "Account Options";
	include('header.php');


?>
	
		<!-- start content -->
		<div id="content">
			<div class="post">
				<h1 class="title"><a href="#">Account Information</a></h1>
				<div class="entry">
					<font color='red'><?php echo $_COOKIE['updateMessage'] . "<br />"; setcookie("updateMessage", "", time()-3600); ?></font>
					
			                <form name='updateInfo' method='post' action='updateInfo.php'>
                			<table width='90%'>
                			<tr>
                        		<td>E-Mail:<br /><input type = "text" name="email" value="<?php echo $_SESSION['email']; ?>"></td>
                        		<td>Confirm New E-Mail:<br /><input type = 'text' name='confirmemail' value = "<?php echo $_SESSION['email']; ?>"></td>
                			</tr>
                			<tr>
                        			<td>First Name:<br /><input type = 'text' name='fname' value='<?php echo $_SESSION['fname']; ?>'></td>
                        			<td>Last Name:<br /><input type = 'text' name='lname' value='<?php echo $_SESSION['lname']; ?>'></td>
                			</tr>
                			<tr>
                        			<td>Zip:<br /><input type = 'text' name='zipcode' value='<?php echo $_SESSION['zipcode']; ?>'></td>
                			</tr>
              
        				</table>
        				<input type='submit' value='Update' name='submit'></form>
				</div>
				<div class="entry">
					<table width='90%'><tr>
					<form name="changePassword" method="post" action="changePassword.php">
					<td>
						New Password:<br />
						<input type="password" name="newPassword"><br />
					</td>
					<td>
						Confirm Password:<br />
						<input type="password" name="confirmPassword"><br />
					</td>
					</tr></table>
					<input type="submit" value="Change Password" name="submit">
					</form>
				</div>
			</div>
		</div>
		<!-- end content -->
<?php include('footer.php'); ?>
